package manager.msales;


import common.db.*;
import common.main.*;
import java.util.*;


public class SaveStateBean extends MainBean
{
	public void funcExecute() throws Exception
	{

		String[] check = (String[])inputTable.get("check");
		Hashtable orderStateTable= (Hashtable)inputTable.get("orderStateTable");
		Hashtable deliveryStateTable= (Hashtable)inputTable.get("deliveryStateTable");

		queryBuffer = new StringBuffer("");

		for (int i=0; i<check.length; i++ )
		{
			String orderState = (String)orderStateTable.get(check[i]);
			String delState = (String)deliveryStateTable.get(check[i]);
			queryBuffer.append("UPDATE MAGIC SET ORDER_STATE ='"+orderState+"', DELIVERY_STATE='"+delState+"' WHERE SEQ ='"+check[i]+"'");
			DBExecute dbe = new DBExecute(queryBuffer.toString());
		}
	}
}